home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / portable / set_term.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-17  |  1.7 KB  |  65 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    set_term
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_set_term = "$Header: C:\CURSES\portable\RCS\set_term.c 2.1 1993/06/18 20:21:10 MH Rel MH $";
  7. #endif
  8.  
  9. #if    EMALLOC
  10. void*    emalloc( size_t );
  11. void*    ecalloc( size_t, size_t );
  12. void    efree( void* );
  13. #endif
  14.  
  15.  
  16.  
  17.  
  18.  
  19. /*man-start*********************************************************************
  20.  
  21.   set_term()    - switch between terminals
  22.  
  23.   X/Open Description:
  24.      This function is used to switch between different terminals.
  25.      The screen reference 'new' becomes the new current terminal.
  26.      The previous terminal is returned by the routine.  This is the
  27.      only routine which manipulates SCREEN pointers; all other routines
  28.      affect only the current terminal.
  29.  
  30.   PDCurses Description:
  31.      FYI: Dual monitor support is not quite complete.  Nothing will
  32.      happen if you try to call this routine.
  33.  
  34.   X/Open Return Value:
  35.      The set_term() function returns a pointer to the previous
  36.      SCREEN structure on success otherwise a NULL pointer is
  37.      returned.
  38.  
  39.   X/Open Errors:
  40.      No errors are defined for this function.
  41.  
  42.   PDCurses Errors:
  43.      It is an error to call this routine at this time.
  44.      It is an error to pass a NULL SCREEN pointer.
  45.  
  46.   Portability:
  47.      PDCurses    SCREEN* set_term( SCREEN* new );
  48.      X/Open Dec '88    SCREEN* set_term( SCREEN* new );
  49.      BSD Curses    
  50.      SYS V Curses    SCREEN* set_term( SCREEN* new );
  51.  
  52. **man-end**********************************************************************/
  53.  
  54. SCREEN*    set_term( SCREEN *new )
  55. {
  56. #ifdef PDCDEBUG
  57.     if (trace_on) PDC_debug("set_term() - called\n");
  58. #endif
  59.  
  60. #ifdef    TC
  61. #  pragma argsused
  62. #endif
  63.     return( &_cursvar );  /* We only have one screen supported right now */
  64. }
  65.